package com.llt.ai.controller;

import com.llt.ai.dto.Result;
import com.llt.ai.entity.Booking;
import com.llt.ai.service.IBookingService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: llt
 * @Date: 2025/8/3 10:46
 */
@RestController
@RequestMapping("/book")
@RequiredArgsConstructor
public class BookingController {

    private final IBookingService bookingService;

    @RequestMapping("/detail")
    public Result getBookingDetail(String bookingNumber, String name) {
        return bookingService.getBookingDetail(bookingNumber, name);
    }

    @RequestMapping("/cancel")
    public boolean cancelBooking(String bookingNumber, String name) {
        return bookingService.cancelBooking(bookingNumber, name);
    }
}
